package com.fourforfo.fourmall.order.feign;

import com.fourforfo.common.utils.R;
import com.fourforfo.fourmall.order.to.WareSkuLockTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;

@FeignClient("fourmall-ware")
public interface WareFeignService {

    /**
     * 订单服务远程发送请求锁定库存结果
     * @param vo
     * @return
     */
    @PostMapping("/ware/waresku/lock/order")
    R orderLockStock(@RequestBody WareSkuLockTO vo);

    @PostMapping("/ware/waresku/list/skus/stock")
    R listBySkus(@RequestBody List<Long> skuIds);

    @GetMapping("/ware/wareinfo/fare")
    R getFare(@RequestParam("addrId")Long addrId);
}
